package com.tangyuan.model.activity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Description: enroll_record
 * @Author: jeecg-boot
 * @Date: 2024-03-20
 * @Version: V1.0
 */
@Data
@TableName("enroll")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "enroll对象", description = "enroll")
public class Enroll implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 活动id
     */
    @ApiModelProperty(value = "活动id")
    private Long activityId;
    /**
     * 票种id
     */
    @ApiModelProperty(value = "票种id")
    private Long voteId;
    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    private Long userId;

    /**
     * 活动金额
     */
    private BigDecimal activityMoney;
    /**
     * 活动状态
     */
    private Integer status;
    /**
     * 订单号
     */
    private String orderNo;
    /**
     * 订单编号
     */
    private String transaction;
    /**
     * 票种数量
     */
    private Integer voteNum;
    /**
     * 支付方式 1-微信 2-支付宝 3-余额
     */
    private Integer payType;
    /**
     * 支付时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "payTime")
    private Date payTime;
    /**
     * createTime
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "createTime")
    private Date createTime;
    /**
     * updateTime
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "updateTime")
    private Date updateTime;
    /**
     * 删除标识
     */
    @ApiModelProperty(value = "删除标识")
    @TableLogic
    private Integer isDeleted;

    @TableField(exist = false)
    private List<EnrollRecord> enrollRecords;
    @TableField(exist = false)
    private String payPwd;

    /**
     * 票种名称
     */
    private String ticketName;

}
